@extends('layouts.home')
@extends('layouts.nav')
@extends('layouts.top')

@section('heading')
    <h3>
        分类设置
    </h3>
    <ul class="breadcrumb">
        <li>
            <a href="#">课程管理</a>
        </li>
        <li class="active"> 分类设置</li>
    </ul>
@endsection

@section('wrapper')
    @include('share.error')
    <div class="row">
        <div class="col-sm-12">
            <section class="panel">
                <header class="panel-heading">
                    &nbsp;
                    <span class="tools pull-right">
                            <button class="btn btn-info" onclick='location.href="{{ route('category.create') }}"'
                                    type="button">新增</button>
                    </span>
                </header>
                <div class="panel-body">
                    <section id="unseen">
                        <table class="table table-bordered table-striped table-condensed">
                            <thead>
                            <tr>
                                <th>名称</th>
                                <th class="text-center">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            @foreach($categorys as $category)
                                <tr>
                                    <td>{{ $category->name }}</td>
                                    <td class="text-center">
                                        <button class="btn btn-success btn-xs" type="button" onclick='location.href="{{ route('category.edit', $category->id) }}"'>编辑</button>
                                    </td>
                                </tr>
                            @endforeach
                            </tbody>
                        </table>
                    </section>
                </div>
            </section>
        </div>
    </div>
@endsection